package com.by.medical.controller;

import com.by.medical.bean.Dept;
import com.by.medical.common.AxiosResult;
import com.by.medical.mapper.DeptMapper;
import com.by.medical.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/dept")
public class DeptController {
    @Autowired
    public DeptMapper deptMapper;
    //查询所有部门
    @GetMapping("/query")
    public AxiosResult<List<Dept>> queryALLDept(){
        return AxiosResult.success(deptMapper.queryAllDept());
    }
}
